import { Model, Post, Get, Put } from "~/utils/annotate";
import { GetListOut, GetByIdOut } from "./interface";
import { EmptyOut } from "~/service/common/interface";

@Model('/system/user')
export default class UserService {

    //获取列表
    @Get('/list')
    getList(res) {
        return new GetListOut(res.code, res).result()
    }

    //获取详情
    @Get('/:id')
    getById(res) {
        return new GetByIdOut(res.code, res).result()
    }

    //新增数据
    @Post()
    insert(res) {
        return new EmptyOut(res.code, res).result()
    }

    //更新数据
    @Put()
    update(res) {
        return new EmptyOut(res.code, res).result()
    }

    //删除数据
    @Get('/deleteByIds/:ids')
    delete(res) {
        return new EmptyOut(res.code, res).result()
    }


    @Get('/')
    getRolePost(res) {

    }

    @Put('/changeStatus')
    statusChange(res) {
        return new EmptyOut(res.code, res).result()
    }

}